package com.tool;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class Test2 {
  public Test2() {
  }

  public int[] pSort(int[] i_p) {
    int iLen = i_p.length;

    int i = 0;
    int j = 0;
    int iTemp = 0;
    for (i = 0; i < iLen; i++) {
      for (j = i + 1; j<iLen; j++) {
        if (i_p[i] > i_p[j]) {
          iTemp = i_p[i];
          i_p[i] = i_p[j];
          i_p[j] = iTemp;
        }
      }
    }

    for (i=0; i<iLen; i++) {
      System.out.println("==" + i_p[i]);
    }
    return i_p;
  }

  public static void main(String args[]) {
    int i_p[] = {
        32, 16, 19, 2, 8, 1
    };
    Test2 t = new Test2();
    t.pSort(i_p);
  }

}